#include<bits/stdc++.h>
using namespace std;
int main() {
    int n;
    cin >> n;
    while (n--) {
        int sex, height, weight;
        cin >> sex >> height >> weight;
        if (sex) {
            if (height < 130) cout << "duo chi yu! ";
            else if (height > 130) cout << "ni li hai! ";
            else  cout << "wan mei! ";
            if (weight < 27) cout << "duo chi rou!" << endl;
            else if (weight == 27) cout << "wan mei!" << endl;
            else cout << "shao chi rou!" << endl;
        } else {
            if (height < 129) cout << "duo chi yu! ";
            else if (height > 129) cout << "ni li hai! ";
            else  cout << "wan mei! ";
            if (weight < 25) cout << "duo chi rou!" << endl;
            else if (weight == 25) cout << "wan mei!" << endl;
            else cout << "shao chi rou!" << endl;
        }
    }
    return 0;
}